# coding:utf-8
from voluptuous import *

BASE_YAML_SCHEMA = {
    'ycase': {
        'name': str,
        'env': Url(),
        'tester': str,
        'steps': [
            {
                'name': str,
                'path': str,
                'method': Any('POST', 'GET', Upper),
                'headers': Any(None, {'Content-Type': str}),
                'params': Any(None, dict),
                'enablevalidate': Boolean(),
                'expected': Any(None, {
                    'statecode': Any(int, None),
                    'errmsg': Any(str, None),
                    'result': object
                })
            }
        ],

    }
}


BASE_RESPONSE_SCHEMA = {
    'statecode': int,
    'errmsg': Any(None, str),
    'result': object
}
